// poj2109
// 题意：给定n(1<=n<=200)，p(1<=p<10^101)求p的开n次方下取整。
//
// 题解：二分治之。
//
// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <sstream>
#include <cmath>
#include <string>
#include <vector>

namespace tue
{
	std::string remove_leading_zero(std::string const & s)
	{
		int i = 0;
		int l = s.size();
		while (i < l && s[i] == '0') i++;
		if (i == l) i--;
		return std::string(s.begin() + i, s.end());
	}

	std::string to_string(int x)
	{
		std::ostringstream oss;
		oss << x;
		return oss.str();
	}

	struct big_integer;
	big_integer operator*(big_integer const & a, big_integer const & b);
	big_integer operator/(big_integer const & a, big_integer const & b);
	big_integer operator+(big_integer const & a, big_integer const & b);
	big_integer operator-(big_integer const & a, big_integer const & b);
	bool operator>(big_integer const & a, big_integer const & b);

	struct big_integer
	{
		big_integer(std::string const & num) : num(remove_leading_zero(num)) {}
		big_integer(int x) : num(to_string(x)) {}
		big_integer() {}

		std::string value() const { return num; }

		void sqrt()
		{
			int l = num.size();
			if (l & 1) { l++; num = "0" + num; }
			int t = (num[0] - '0') * 10 + num[1] - '0';
			int rt = std::sqrt(t);
			big_integer result(rt);
			big_integer r(t - rt * rt);
			for (int i = 2; i < l; i += 2) {
				big_integer left = result * big_integer(20);
				r = r * big_integer(100) + big_integer((num[i] - '0') * 10 + num[i + 1] - '0');
				for (int j = 9; j >= 0; j--) {
					big_integer now(j);
					big_integer tmp = (left + now) * now;
					if (tmp > r) continue;
					result = result * big_integer(10) + now;
					r = r - tmp;
					break;
				}
			}
			num = result.value();
		}

	private:
		std::string num;
	};

	std::ostream & operator<<(std::ostream & os, big_integer const & a)
	{
		os << a.value();
		return os;
	}

	big_integer operator*(big_integer const & a, big_integer const & b)
	{
		std::string const & s1 = a.value();
		std::string const & s2 = b.value();
		int l1 = s1.size();
		int l2 = s2.size();
		std::vector<int> s(2 * (l1 + l2));
		int l = 2 * (l1 + l2);
		for (int i = 0; i < l1; i++)
			for (int j = 0; j < l2; j++)
				s[l - i - j - 1] += (s1[l1 - i - 1] - '0') * (s2[l2 - j - 1] - '0');
		for (int i = 0; i < l; i++)
			if (s[l - i - 1] > 9) {
				int t = s[l - i - 1];
				s[l - i - 2] += t / 10;
				s[l - i - 1]  = t % 10;
			}
		std::string ts(2 * (l1 + l2), '0');
		for (int i = 0; i < 2 * (l1 + l2); i++)
			ts[i] += s[i];
		return big_integer(ts);
	}

	big_integer operator/(big_integer const & a, int x)
	{
		std::string const & s1 = a.value();
		int l1 = s1.size();
		std::vector<int> s(l1);
		int l = l1;
		for (int i = 0; i < l1; i++) s[i] = s1[i] - '0';
		for (int i = 0; i < l1; i++) {
			if (i < l1 - 1)
				s[i + 1] += (s[i] % x) * 10;
			s[i] /= x;
		}
		std::string ts(l, '0');
		for (int i = 0; i < l; i++)
			ts[i] += s[i];
		return big_integer(ts);
	}

	big_integer operator+(big_integer const & a, big_integer const & b)
	{
		std::string const & s1 = (a > b) ? a.value() : b.value();
		std::string const & s2 = (a > b) ? b.value() : a.value();
		int l1 = s1.size() + 1;
		int l2 = s2.size();
		std::vector<int> s(l1);
		for (int i = 1; i < l1; i++) s[i] = s1[i - 1] - '0';
		for (int i = 0; i < l2; i++) {
			s[l1 - i - 1] += s2[l2 - i - 1] - '0';
			if (s[l1 - i - 1] > 9) {
				s[l1 - i - 1] -= 10;
				s[l1 - i - 2]++;
			}
		}
		std::string ret(l1, '0');
		for (int i = 0; i < l1; i++) ret[i] += s[i];
		return big_integer(ret);
	}

	big_integer operator-(big_integer const & a, big_integer const & b) // assume a > b
	{
		std::string const & s1 = a.value();
		std::string const & s2 = b.value();
		int l1 = s1.size();
		int l2 = s2.size();
		std::vector<int> s(l1);
		for (int i = 0; i < l1; i++) s[i] = s1[i] - '0';
		for (int i = 0; i < l2; i++) {
			s[l1 - i - 1] -= s2[l2 - i - 1] - '0';
			if (s[l1 - i - 1] < 0) {
				s[l1 - i - 1] += 10;
				s[l1 - i - 2]--;
			}
		}
		std::string ret(l1, '0');
		for (int i = 0; i < l1; i++) ret[i] += s[i];
		return big_integer(ret);
	}

	bool operator>(big_integer const & a, big_integer const & b)
	{
		std::string const & s1 = a.value();
		std::string const & s2 = b.value();
		int i = 0, j = 0;
		for (; s1[i] == '0'; i++);
		for (; s2[j] == '0'; j++);
		int l1 = s1.size(), l2 = s2.size();
		if (l1 - i != l2 - j) return l1 - i > l2 - j;
		for (int t = 0; t + i < l1 && t + j < l2; t++)
			if (s1[t + i] != s2[t + j])
				return s1[t + i] > s2[t + j];
		return false;
	}

	big_integer sqrt(big_integer const & a)
	{
		big_integer ret = a;
		ret.sqrt();
		return ret;
	}

	big_integer big_quick(big_integer const & a, int b)
	{
		if (!b) return big_integer(1);
		big_integer ret = big_quick(a, b / 2);
		ret = ret * ret;
		if (b & 1) ret = ret * a;
		return ret;
	}

	big_integer kth_root(big_integer const & a, int n)
	{
		big_integer l(1);
		big_integer r = a;
		big_integer one(1);
		while (r > l + one) {
			big_integer mid = (l + r) / 2;
			if (big_quick(mid, n) > a) r = mid;
			else l = mid;
		}
		if (big_quick(r, n) > a) r = l;
		return r;
	}
}

int main()
{
	int n;
	std::string s;
	while (std::cin >> n >> s) {
		tue::big_integer big(s);
		std::cout << tue::kth_root(big, n) << '\n';
	}
}

